<?php

require_once __DIR__ . '/BaseController.php';

class SsqController extends BaseController
{
    public function __construct()
    {
        $this->dataRoot = dirname(__DIR__) . '/data/ssq/';
        $this->orderDataRoot = dirname(__DIR__) . '/data/ssq/order/';
        parent::initialize();
    }

    function datasource()
    {
        $filename = $this->dataRoot . 'data.json';
        if (!file_exists($filename)) {
            return message(null, '数据不存在', 500);
        }
        return message(json_decode(file_get_contents($filename), true));
    }
}
